
#include "../src/projectconfig.h"


#define SOFTSPI_SCLK_PORT 3
#define SOFTSPI_SCLK_PIN 2
#define SOFTSPI_SCLK IOCON_PIO3_2
#define SOFTSPI_MOSI_PORT 1
#define SOFTSPI_MOSI_PIN 11
#define SOFTSPI_MOSI IOCON_PIO1_11
#define SOFTSPI_MISO_PORT 1
#define SOFTSPI_MISO_PIN 4
#define SOFTSPI_MISO IOCON_PIO1_4
#define SOFTSPI_CS1_PORT 1
#define SOFTSPI_CS1_PIN 10
#define SOFTSPI_CS1  IOCON_PIO1_10

#define CS_AS1107 SOFTSPI_CS1

void init_spi ();
void write_spi (unsigned char data_out);
void as1107write8 (unsigned char adress, unsigned char data);
void as1107write8_device (unsigned char device, unsigned char adress, unsigned char data);

